package com.example.kotlin.scrollingtable.java_type3.model;

import android.annotation.SuppressLint;
import android.support.v7.widget.LinearLayoutManager;
import android.view.MotionEvent;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.kotlin.scrollingtable.R;
import com.example.kotlin.scrollingtable.java_type3.JavaRvType3RightAdapter;
import org.jetbrains.annotations.Nullable;
import java.util.List;

/**
 * Created by admin  2019/11/28/14:10
 * Describe
 * 作者 洪亮 admin
 */

public class JavaRvType3LeftAdapter extends BaseQuickAdapter<JavaType3ProductModel, BaseViewHolder> {

    public JavaRvType3LeftAdapter(int layoutResId, List list) {
        super(layoutResId, list);
    }

    private LinearLayoutManager mRightLinearLayoutManager;
    private JavaRvType3RightAdapter mRvType3RightAdapter;

    public final LinearLayoutManager getMRightLinearLayoutManager() {
        return this.mRightLinearLayoutManager;
    }

    public final void setMRightLinearLayoutManager(@Nullable LinearLayoutManager var1) {
        this.mRightLinearLayoutManager = var1;
    }

    public final JavaRvType3RightAdapter getMRvType3RightAdapter() {
        return this.mRvType3RightAdapter;
    }

    public final void setMRvType3RightAdapter(@Nullable JavaRvType3RightAdapter var1) {
        this.mRvType3RightAdapter = var1;
    }

    @Override
    protected void convert(final BaseViewHolder helper, final JavaType3ProductModel item) {

        helper.setText(R.id.tv_data, item.getProductName());


/*        Intrinsics.checkParameterIsNotNull(helper, "helper");
        Intrinsics.checkParameterIsNotNull(item, "item");
        final int productPosition = helper.getAdapterPosition();
        helper.setText(R.id.tv_data, item.getProductName());
        View var10000 = helper.itemView;
        Intrinsics.checkExpressionValueIsNotNull(var10000, "helper.itemView");
        var10000.setPressed(item.isPressed());
        helper.itemView.setOnTouchListener(new View.OnTouchListener() {
            @SuppressLint("ClickableViewAccessibility")
            public final boolean onTouch(View view, MotionEvent event) {
                View var3;
                switch (event.getAction()) {
                    case 0:
                        var3 = helper.itemView;
                        var3.setPressed(true);
                        item.setPressed(true);
                        break;
                    case 1:
                    case 3:
                        var3 = helper.itemView;
                        var3.setPressed(false);
                        item.setPressed(false);
                    case 2:
                    default:
                        break;
                }
                JavaRvType3RightAdapter var4 = JavaRvType3LeftAdapter.this.getMRvType3RightAdapter();
                if (var4 != null) {
                    var4.notifyItemChanged(productPosition);
                }
                return false;
            }
        });*/
    }
}
